/* 装车单
 */

import { postRequest, getRequest } from '@/lib/axios'

export const taskApi = {
  // 装车单列表
  queryTaskList: (param) => {
    return getRequest('/load/list', param)
  },
  // 调度
  addLoad: (param) => {
    return postRequest('/load/add', param, 60000)
  },
  // 编辑
  editLoad: (param) => {
    return postRequest('/load/edit', param, 60000)
  },
  // 修改
  modifyLoad: (param) => {
    return postRequest('/load/modify', param, 60000)
  },
  // 删除
  delLoad: (param) => {
    return postRequest('/load/del', param)
  },
  // 删除已分配的配送单
  delLoadOrder: (param) => {
    return postRequest('/load/del_delivery', param)
  },
  // 详情明细
  detailLoad: (param) => {
    return getRequest('/load/detail', param)
  },
  // 合并打印
  loadPrint: (param) => {
    return getRequest('/load/print', param)
  },
  // 详情商品明细
  detailLoadGoods: (param) => {
    return getRequest('/load/goods_detail', param)
  },
  // 未确认装车装车单回退
  cancelScheduling: (param) => {
    return postRequest('/load/cancel_scheduling', param)
  },
  // 已装车装车单回退
  cancelLoading: (param) => {
    return postRequest('/load/cancel_loading', param, 60000)
  }
}
